import { Body, Controller, Post } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { CodeSmsd_Service } from '../codeSmsd/codeSmsd.service';
import { util_ApiResponse_Base } from '@/common/util/apiResponse';
import { CodeSmsd_Create_Dto } from '../codeSmsd/assets/codeSmsd.dto';
import { util_Index_ReturnContent } from '@/common/util/index';

@Controller('/web/codeSmsdWeb')
@ApiTags('codeSmsdWeb 发送验证码')
export class CodeSmsdWeb_Controller {
  constructor(private readonly codeSmsd_Service: CodeSmsd_Service) {}

  @Post('/send')
  @util_ApiResponse_Base({
    dataType: 'dataType_string',
    status: 201,
    description: '发送成功',
    type: '发送成功',
    //apiKey: '/web/codeSmsdWeb/send Post',
    summary: '发送验证码',
    noAuth: true,
  })
  async codeSmsdWeb_Send(@Body() body: CodeSmsd_Create_Dto) {
    return util_Index_ReturnContent(await this.codeSmsd_Service.codeSmsd_Send(body));
  }
}
